home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / et / et3_0-a1.lha / et3 / src / Box.h < prev    next >
C/C++ Source or Header  |  1992-04-27  |  2KB  |  75 lines

  1. #ifndef Box_First
  2. #ifdef __GNUG__
  3. //pragma once
  4. #pragma interface
  5. #endif
  6. #define Box_First
  7.  
  8. #include "CompVObject.h"
  9.  
  10.  
  11. struct rcinfo;
  12.  
  13. //---- Box ---------------------------------------------------------------------
  14.  
  15. class Box: public CompositeVObject {
  16. protected:
  17.     Point colsrows, gap;
  18.     VObjAlign align;
  19.  
  20. protected:
  21.     void getGrid(Point &rc, rcinfo*);
  22.     Metric getMinSize(Point &rc, rcinfo*);
  23.     void expand(Point &rc, rcinfo *rci, Point &g, Point &r);
  24.     int expandCnt();
  25.  
  26. public:
  27.     MetaDef(Box);
  28.  
  29.     Box(int id, Point cr, Point gap, VObjAlign);
  30.     Box(int id, Point cr, Point gap, VObjAlign, VObject*, ...);
  31.     Box(int id, Point cr, Point gap, VObjAlign, SeqCollection*);
  32.     Box(int id, Point cr, Point gap, VObjAlign, va_list);
  33.     
  34.     void SetGap(Point g);
  35.     Point GetGap()
  36.     { return gap; }
  37.     void SetAlign(VObjAlign a);
  38.     VObjAlign GetAlign()
  39.     { return align; }
  40.     Point GetColsRowsSize()
  41.     { return colsrows; }
  42.     void SetColsRowsSize(Point cr);
  43.  
  44.     Point ColsRowsSize();
  45.     void SetOrigin(Point at);
  46.     void SetExtent(Point e);
  47.     Metric GetMinSize();
  48.     void DrawAll(Rectangle r, bool highlight);
  49.     OStream& PrintOn(OStream&);
  50.     IStream& ReadFrom(IStream&);
  51. };
  52.  
  53. //---- HBox --------------------------------------------------------------------
  54.  
  55. class HBox: public Box {
  56. public:
  57.     MetaDef(HBox);
  58.     HBox(Point gap, VObjAlign);
  59.     HBox(Point gap, VObjAlign, VObject*, ...);
  60.     HBox(Point gap, VObjAlign, SeqCollection*);
  61. };
  62.  
  63. //---- VBox --------------------------------------------------------------------
  64.  
  65. class VBox: public Box {
  66. public:
  67.     MetaDef(VBox);
  68.     VBox(Point gap, VObjAlign);
  69.     VBox(Point gap, VObjAlign, VObject*, ...);
  70.     VBox(Point gap, VObjAlign, SeqCollection*);
  71. };
  72.  
  73. #endif
  74.  
  75.